function openGoods(id){
	openWin('detail', {
		id: id,
	})
}

function getNewCount(){
	$.ajax({
		url : "http://www.aiyi5.com/getNewCount",
		type : "POST",
		async : false,
		dataType: 'json',
		error : function(errorMsg) {

		},
		success : function(data) {
			if(data.msg != '0'){
				$('.iconxinf').append('(' + data.msg + ')');
			}
		}
	});
}

function toGoodsList(type, key) {
	openWin('list', {
		type: type,
		key: encodeURI(encodeURI(key)),
	})
	// window.location.href = 'list.html?type=' + type + '&key=' + encodeURI(encodeURI(key));
}

function toBType(bType){
	openWin('list_frame', {
		bType: bType,
	})
  //  window.location.href = 'list.html?bType=' + bType;
}

function isLogined(){
	var re = 0;
	$.ajax({
		url : "http://www.aiyi5.com/isLogin",
		type : "POST",
		async : false,
		dataType: 'json',
		error : function(errorMsg) {

		},
		success : function(data) {
			if(data.code == '0'){
				re = 1;
			}
		}
	});
	if(re == 0){
		return false;
	}
	return true;
}
